<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@page import="iwpl.project.dao.EquipmentDetailsDAO"%>
<%@page import="iwpl.project.entities.EquipmentDetails"%>
<%@page import="iwpl.project.entities.Equipments"%>
<%@page import="iwpl.project.dao.EquipmentsDAO"%>
<%@page import="iwpl.project.dao.ApartmentsDAO"%>
<%@page import="iwpl.project.entities.Apartments"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<script src="js/jquery-Source.js"></script>
<script type="text/javascript" src="js/jquery-Validation.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#commentForm").
validate();
  });
  </script>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'Insert_EquipmentDetails.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body> 
     
      
    
<form class="cmxform" id="commentForm" action="./servlet/Control_EquipmentDetail"  method="post">

			<style type="text/css">
label.error {
	float: none;
	color: red;
	padding-left: .5em;
	vertical-align: top;
}
</style>
			<tr align="center">
				<td>
					<br />
				</td>
			</tr>
			
				<div align="center">

					<table width="280" border="0" height="198">
						<tbody>
							<tr>
								<td>
									<table width="500" border="1" height="296">
										<tbody>
											<tr>
												<td style="width: 200px">
													<h2>
														Insert EquipmentDetails
													</h2>
												</td>
												<td>
													&nbsp;
												</td>
											</tr>
											<tr>
												<td>
													&nbsp;
													<br>
												</td>
												<td>
													&nbsp;
													<br>          
												</td>
											</tr>
										<tr>
												<td>
													&nbsp;Equipment Name
												</td>
												<td>
													<select name="cboEquipmentName" style="width:256px">
														<%
															EquipmentsDAO objDao= new EquipmentsDAO();
															List<Equipments> lstOff = objDao.findAll();
															for( Iterator it = lstOff.iterator(); it.hasNext(); ) {
																		Equipments eq = (Equipments)it.next();
														 %> 				
														<option value="<%=eq.getId()%>" label="<%=eq.getEquipmentName()%>" style="color:red;"> 
														</option>
														<%} %>
														</select>

												</td>
											</tr>
											
											<tr>
												<td>
													&nbsp;Number Apartment
												</td>
												<td>
													<select name="cboApartmentNumber" style="width:256px">
														<%
															ApartmentsDAO aDao= new ApartmentsDAO();
															List<Apartments> lstA = aDao.findAll();
															for( Iterator it = lstA.iterator(); it.hasNext(); ) {
																		Apartments eq = (Apartments)it.next();
														 %> 				
														<option value="<%=eq.getId()%>" label="<%=eq.getApartmentNumber()%>" style="color:red;"> 
														</option>
														<%} %>
														</select>
												</td>
											</tr>
											                                                                                                                                                                                                                   <tr>
												
											<tr>
												<td valign="top">
													<input type="submit" value="Insert" name="btnInsert"
														class="submit" />
												</td>
												<td valign="top">
												
													<input type="button" value="Back" name="btnBack"
														onClick="self.location='Manage_EquipmentDetails.jsp'" />
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
							<tr>
							</tr>
						</tbody>
					</table>

				</div>
			</form>

 
   
  
  </body>
</html>
